home *** CD-ROM | disk | FTP | other *** search
- Path: erich.triumf.ca!bennett
- From: bennett@erich.triumf.ca (P.Bennett)
- Newsgroups: comp.lang.c
- Subject: Re: Newbie: Need Help with keyboard and timing
- Date: 7 Apr 1996 21:05 PST
- Organization: TRIUMF: Tri-University Meson Facility
- Distribution: world
- Message-ID: <7APR199621055343@erich.triumf.ca>
- References: <4k94j4$328@sanjuan.islandnet.com>
- NNTP-Posting-Host: erich.triumf.ca
- News-Software: VAX/VMS VNEWS 1.50
-
- In article <4k94j4$328@sanjuan.islandnet.com>, Abram Hindle <abehind@islandnet.com> writes...
- >Hi!
- >I really need help with getting keys pressed from the keyboard
- >but not stopping the program til a key is pressed. What I
- >want is IBM compatible way of getting input from the keyboard
- >much like basic's INKEY$ command. It's for a small little
- >game I'm making.
-
- Borland (and Microsoft) provide non-ANSI functions for this - kbhit(), getch(),
- and getche(), all declared in conio.h
-
- >Also, how do I time using milliseconds like the TIMER in
- >basic.
-
- I don't speak BASIC, so don't know how TIMER works, but Borland provides a
- delay() function (in dos.h) that might work.
-
- It pays to look through the library reference to see all the functions that are
- there (and it's often quicker than asking on a newsgroup.)
-
- Peter Bennett VE7CEI | Vessels shall be deemed to be in sight
- Internet: bennett@triumf.ca | of one another only when one can be
- Packet: ve7cei@ve7kit.#vanc.bc.ca | observed visually from the other
- TRIUMF, Vancouver, B.C., Canada | ColRegs 3(k)
- GPS and NMEA info and programs: ftp://sundae.triumf.ca/pub/peter/index.html
- or: ftp://ftp-i2.informatik.rwth-aachen.de/pub/arnd/GPS/peter/index.html
-
-
-
-
-
-
-